
<nav class="navbar navbar-default navbar-fixed-top">
    <div class="container">
        <!-- Brand and toggle get grouped for better mobile display -->
        <div class="navbar-header">
            <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bsnavbar" aria-expanded="false">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a class="navbar-brand" href="{:url('/index')}"><img src="{$setting.logo_url}" /></a>
        </div>

        <!-- Collect the nav links, forms, and other content for toggling -->
        <div class="collapse navbar-collapse" id="bsnavbar">
            <ul class="nav navbar-nav navbar-right">
                <li class="active"><a href="{:url('/index')}">网站首页</a></li>
                {volist name="columnName" id="v"}
                <li class="dropdown">
                    <a href=" {if condition="$v.template_type eq 0"}{:url('/page',array('id'=>$v.id))}{elseif condition="$v.template_type eq 1" /}{:url('/article',array('id'=>$v.id))}{elseif condition="$v.template_type eq 2" /}{:url('/product',array('id'=>$v.id))}{else /}{:url('/message',array('id'=>$v.id))}{/if}" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">{$v.column_name}<span class="caret"></span></a>
                    {if condition="$v.children neq 0"}
                    <ul class="dropdown-menu" >
                        {volist name="$v.children" id="son"}
                        {if condition="$son.template_type eq 0"}
                        <li><a href="{:url('/page',array('id'=>$son.id))}">{$son.column_name}</a></li>
                        <li role="separator" class="divider"></li>
                        {elseif condition="$son.template_type eq 1"}
                        <li><a href="{:url('/article',array('id'=>$son.id))}">{$son.column_name}</a></li>
                        <li role="separator" class="divider"></li>
                        {elseif condition="$son.template_type eq 2"}
                        <li><a href="{:url('/product',array('id'=>$son.id))}">{$son.column_name}</a></li>
                        <li role="separator" class="divider"></li>
                        {elseif condition="$son.template_type eq 3"}
                        <li><a href="{:url('/message',array('id'=>$son.id))}">{$son.column_name}</a></li>
                        <li role="separator" class="divider"></li>
                        {/if}
                        {/volist}
                    </ul>
                    {/if}
                </li>
                {/volist}
            </ul>
        </div><!-- /.navbar-collapse -->
    </div><!-- /.container-->
</nav>